import request from "./request";
export const getCustomer = (params) => {
  return request({
    url: `/customer/findAll`,
    // url:`/a.json`,
    method: 'get',
    params,
  })
}

export const saveUser = (data) => {
  return request({
    url: `/user/save`,
    method: 'post',
    data,
  })
}

export const changeUserPass = (data, id) => {
  return request({
    url: `/user/password/${id}`,
    method: 'post',
    data
  })
}

export const saveGanXiang = (data) => {
  return request({
    url: `/ganxiang/shenqing`,
    method: 'post',
    data,
  })
}

export const draftGanXiang = (data) => {
  return request({
    url: `/ganxiang/shenqingcaogao`,
    method: 'post',
    data,
  })
}

export const draftGanXiangKaiPiao = (data) => {
  return request({
    url: `/ganxiang/kaipiaozancun`,
    method: 'post',
    data,
  })
}

export const draftLingbujian = (data) => {
  return request({
    url: `/lingbujian/shenqingcaogao`,
    method: 'post',
    data,
  })
}

export const draftLingbujianKaiPiao = (data) => {
  return request({
    url: `/lingbujian/kaipiaoCaoGao`,
    method: 'post',
    data,
  })
}

export const draftNeiXiao = (data) => {
  return request({
    url: `/neixiao/savecaogao`,
    method: 'post',
    data,
  })
}

export const kaiPiaoGanXiang = (data) => {
  return request({
    url: `/ganxiang/kaipiao`,
    method: 'post',
    data,
  })
}

export const xiuGaiGanXiang = (data) => {
  return request({
    url: `/ganxiang/xiugai`,
    method: 'post',
    data,
  })
}

// export const saveLingBuJian = (data) => {
//   return request({
//     url: `/lingbujian/save`,
//     method: 'post',
//     data,
//   })
// }

export const saveLingBuJian = (data) => {
  return request({
    url: `/lingbujian/shenqing`,
    method: 'post',
    data,
  })
}

export const kaiPiaoLingBuJian = (data) => {
  return request({
    url: `/lingbujian/kaipiao`,
    method: 'post',
    data,
  })
}

export const xiuGaiLingBuJian = (data) => {
  return request({
    url: `/lingbujian/xiugai`,
    method: 'post',
    data,
  })
}

export const saveNeiXiao = (data) => {
  return request({
    url: `/neixiao/save`,
    method: 'post',
    data,
  })
}

export const saveCustomer = (data) => {
  return request({
    url: `/customer/save`,
    method: 'post',
    data,
  })
}

export const dollars = (params) => {
  return request({
    url: `/number/dollars/${params}`,
    method: 'get',
  })
}

export const ganxiangDown = (params) => {
  return request({
    url: `/ganxiang/downNumber/${params}`,
    method: 'get',
  })
}

export const lingbujianDown = (params) => {
  return request({
    url: `/lingbujian/downNumber/${params}`,
    method: 'get',
  })
}

export const neixiaoDown = (params) => {
  return request({
    url: `/neixiao/downNumber/${params}`,
    method: 'get',
  })
}

export const ganxiangPrint = (params) => {
  return request({
    url: `/ganxiang/printNumber/${params}`,
    method: 'get',
  })
}

export const lingbujianPrint = (params) => {
  return request({
    url: `/lingbujian/printNumber/${params}`,
    method: 'get',
  })
}

export const yuan = (params) => {
  return request({
    url: `/number/yuan/${params}`,
    method: 'get',
  })
}

export const ganxiangList = (params, p1, p2) => {
  return request({
    url: `/ganxiang/page/${p1}/${p2}`,
    method: 'get',
    params
  })
}

export const lingbujianList = (params, p1, p2) => {
  return request({
    url: `lingbujian/page/${p1}/${p2}`,
    method: 'get',
    params
  })
}

export const neixiaoList = (params, p1, p2) => {
  return request({
    url: `neixiao/page/${p1}/${p2}`,
    method: 'get',
    params
  })
}

export const qdList = (params, p1, p2) => {
  return request({
    url: `/qd/${p1}/${p2}`,
    method: 'get',
    params
  })
}

export const invoicedList = (params, p1, p2) => {
  return request({
    url: `/qd/daikaipiao/${p1}/${p2}`,
    method: 'get',
    params
  })
}

export const customerList = (params, p1, p2) => {
  return request({
    url: `/customer/page/${p1}/${p2}`,
    method: 'get',
    params
  })
}

export const invoiceNumber = (params) => {
  return request({
    url: `lingbujian/invoiceNumber`,
    method: 'get',
    params
  })
}

export const neixiao = (data) => {
  return request({
    url: `/neixiao/newAndOld/${data}`,
    method: 'get',
    // params
  })
}

export const ganxiang = (data) => {
  return request({
    url: `ganxiang/newAndOld/${data}`,
    method: 'get',
    // params
  })
}

export const lingbujian = (data) => {
  return request({
    url: `lingbujian/newAndOld/${data}`,
    method: 'get',
    // params
  })
}

export const searchGanXiang = (params) => {
  return request({
    url: `/ganxiang/${params}`,
    method: 'get',
    // params
  })
}

export const searchLingBuJian = (params) => {
  return request({
    url: `/lingbujian/${params}`,
    method: 'get',
    // params
  })
}

export const uploadFile = (data, params) => {
  return request({
    url: `/files/upload/${params}`,
    method: 'post',
    data
  })
}

export const findAllByName = (params) => {
  return request({
    url: `customer/findAllByName`,
    method: 'get',
    params
  })
}

export const findBank = (params) => {
  return request({
    url: `/bank/findAll`,
    method: 'get',
    params
  })
}

export const neixiaoXiuGai = (data) => {
  return request({
    url: `/neixiao/xiugai/`,
    method: 'post',
    data
  })
}

export const delBatch = (data) => {
  return request({
    url: `/customer/delBatch`,
    method: 'put',
    data
  })
}

export const ganxiangExamine = (data) => {
  return request({
    url: `/ganxiang/success`,
    method: 'put',
    data
  })
}

export const ganxiangExamineFalse = (data) => {
  return request({
    url: `/ganxiang/false`,
    method: 'put',
    data
  })
}

export const lingbujianExamine = (data) => {
  return request({
    url: `/lingbujian/success`,
    method: 'put',
    data
  })
}

export const lingbujianExamineFalse = (data) => {
  return request({
    url: `/lingbujian/false`,
    method: 'put',
    data
  })
}

export const exportLists = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/sqqd/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportdaikaipiao = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/daikaipiao/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportcustomer = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/customer/page/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportganxiang = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/ganxiang/page/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportdaishenhe = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/daishenhe/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportlingbujian = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/lingbujian/page/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportneixiao = (params, pageNum, pageSize) => {
  return request({
    url: `/excel/neixiao/page/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const exportTime = (params, pageNum, pageSize) => {
  return request({
    url: `/qd/time/export/${pageNum}/${pageSize}`,
    method: 'get',
    responseType: 'blob',
    params
  })
}

export const getTime = (params, pageNum, pageSize) => {
  return request({
    url: `/qd/time/${pageNum}/${pageSize}`,
    method: 'get',
    params
  })
}

export const deleteFile = (flag) => {
  return request({
    url: `/files/ty/delete/${flag}`,
    method: 'delete',
  })
}

